#ifndef GRAPHE_H_
#define GRAPHE_H_

typedef struct s_graph *t_graph;
typedef struct s_som   *t_som;
typedef struct s_adj   *t_adj;
 
struct s_som
{
  int	som;
  float cost;
  t_adj	succ, pred;
};
 
struct s_adj
{
  float	cost;
  int	vsom;
  t_adj	next;
};
 
struct s_graph
{
  int		order;
  t_som		lsom[1];
};

t_graph create_graph (int);
void add_arc(t_graph, int, int, float);
void add_somCost (t_graph, int, float);
int parcours (t_graph, int *, float *);
void dijkstra (t_graph, int, int *, float *);
#endif
